package com.controller;

import com.service.ResetPasswordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;
import java.util.Map;

/**
 * @author mornd
 * @date 2020/11/19 - 17:39
 */
@RestController
public class ResetPasswordController {
    @Autowired
    private ResetPasswordService resetPasswordService;

    @RequestMapping("/resetPassword")
    public Map<String, Object> resetPassword(String oldPwd, String newPwd, Principal principal) {
        return resetPasswordService.resetPassword(oldPwd, newPwd, principal);
    }
}
